package com.sq.partner.manager.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.sq.partner.manager.dao.CoinPlanConfigDao;
import com.sq.partner.manager.dao.ICoreCoverageDao;
import com.sq.partner.manager.mybatis.model.CoinPlanConfig;
import com.sq.partner.manager.mybatis.model.CoreCoverage;
import com.sq.partner.manager.service.CoinPlanConfigService;
@Repository
public class CoinPlanConfigDaoImpl extends BaseDaoImpl implements CoinPlanConfigDao {

	@Override
	public boolean insertCoinPlan(CoinPlanConfig coinPlan) throws Exception {
		
		return this.add("addCoinPlan", coinPlan);
	}

	@Override
	public void deleteCoinPlan(CoinPlanConfig coinPlan) throws Exception {
		this.delete("deleteCoinPlan", coinPlan.getPlanNo());
	}

	@Override
	public Integer queryCoinFeeCount(String agentNo) throws Exception {
		// TODO Auto-generated method stub
		return (Integer) this.query("queryCoinFeeCount", agentNo);
	}

	@Override
	public List<Map<String, Object>> queryCoinFeeList(String agentNo)
			throws Exception {
		// TODO Auto-generated method stub
		return this.queryList("queryCoinFeeList", agentNo);
	}

	@Override
	public List<CoinPlanConfig> searchCoinPlanConfigServiceByplanCode(
			Map<String, Object> maps) throws Exception {
		// TODO Auto-generated method stub
		return this.queryList("searchCoinPlanConfigServiceByplanCode", maps);
	}

	@Override
	public List<Map<String, Object>> implCoinPlan(Map<String, Object> maps)
			throws Exception {
		// TODO Auto-generated method stub
		 return this.queryList("impleCoin", maps);
	}
	
}
